package edu.sfsu.powerrangers.jeopardy.gamestate;

import java.io.Serializable;
import java.util.Vector;

public class Round extends Vector<Category> implements Cloneable, Serializable {
	private static final long serialVersionUID = 1L;
	
	public Round clone() {
		Round r = new Round();
		for (Category c : this) r.add(c.clone());
		return r;
	}
	
	public String[] getCategoryNames() {
		Vector<String> v = new Vector<String>();
		for (Category c : this) v.add(c.getCategoryName());
		return v.toArray(new String[0]);
	}
	
	public boolean allRespondedTo() {
		for (Category c : this)
			if (!c.allRespondedTo())
				return false;
		return true;
	}
	
	public int getMaxValue() {
		int v = 0;
		for (Category c : this)
			if (c.getMaxValue() > v)
				v = c.getMaxValue();
		return v;
	}
}
